<template>
	<view style="padding: 20rpx;">
		<u-navbar :title="title"></u-navbar>
		<rich-text :nodes="nodes"></rich-text>
	</view>
</template>

<script setup lang="ts">
	import { ref } from 'vue';
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import common from '../../api/common.js';
	let title = ref('')
	let nodes = ref('')
	const sysConfig = async () => {
		const res = await common.sysConfig()
		let agreement = res.data.agreement
		let privacy_policy = res.data.privacy_policy
		nodes.value = title.value == '奢董会用户协议' ? agreement : privacy_policy
	}
	onLoad((op: any) => {
		if(op.type == 0) {//奢董会用户协议
			title.value = '奢董会用户协议'
		}else{//奢董会隐私政策
			title.value = '奢董会隐私政策'
		}
		sysConfig()
	})
</script>

<style>
</style>